package org.dromara.vehicle.modules.configDistrict.controller;

import lombok.RequiredArgsConstructor;
import org.dromara.common.core.domain.R;
import org.dromara.common.web.core.BaseController;
import org.dromara.vehicle.modules.configDistrict.service.GeoConfigDistrictService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 行政区域坐标库(GeoConfigDistrict)表控制层
 *
 * @author ckk
 * @since 2025-07-12 16:14:19
 */
@RestController
@RequestMapping("/vehicle/geoConfig")
@RequiredArgsConstructor
public class GeoConfigDistrictController extends BaseController {
    /**
     * 服务对象
     */
    private final GeoConfigDistrictService geoConfigDistrictService;

    /**
     * 获取选区边界
     */
    @GetMapping("boundaries")
    public R<List<List<double[]>>> boundaries(String adCode) {
        return R.ok(geoConfigDistrictService.getDistrictBoundaries(adCode));
    }

}

